package com.achao.achaomq.service.impl;


import com.achao.achaomq.dao.NormalDao;
import com.achao.achaomq.service.NormalService;
import com.achao.achaomq.entity.SchoolPO;
import com.alibaba.fastjson2.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NormalServiceImpl implements NormalService {

    @Autowired
    private NormalDao normalDao;

    //嵌套查询
    @Override
    public String normalTest() {
        List<SchoolPO> schoolPOS = normalDao.schoolList1(1);
        return JSONObject.toJSONString(schoolPOS);
    }
    //嵌套结果
    @Override
    public String normalTest1() {
        List<SchoolPO> schoolPOS = normalDao.schoolList1(1);
        return JSONObject.toJSONString(schoolPOS);
    }
}
